/*
 * @Author: chenhuanhuan 2925102113@qq.com
 * @Date: 2024-08-22 09:39:40
 * @LastEditors: chenhuanhuan 2925102113@qq.com
 * @LastEditTime: 2024-10-09 12:00:19
 * @FilePath: \orderApp\service\business\login\index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { httpGet, httpPost } from '@/utils/http'
import type { UserType, KitchType, StyleType, TasteType ,UserHealthyInfo,AttentionInfo} from './type'

/** 请求当前日期餐次数据*/
// export const reqCurDate = (params = {}) => {
//   return httpGet('/commentApp/user/getNowDate', params)
// }

/** 登录请求 */
export const login = (params = {}) => {
  return httpPost<UserType>('/commentApp/user/login', params)
}


/** 注册请求 */
export const userRegister = (params = {}) => {
  return httpPost('/commentApp/user/userRegister', params)
}

/** 登出请求 */
export const logout = (params = {}) => {
  return httpPost('/commentApp/user/userOut', params)
}

/**
 * 用户偏好请求
 */
/** 伙食灶请求 */
export const reqFoodOven = (params = {}) => {
  return httpGet<KitchType>('/commentApp/user/getFoodOven', params)
}
//**菜系偏好 */
export const reqStyleAll = (params = {}) => {
  return httpGet<StyleType>('/commentApp/user/getStyleAll', params)
}
/**口味偏好 */
export const reqTasteAll = (params = {}) => {
  return httpGet<TasteType>('/commentApp/user/getTasteAll', params)
}
/** 偏好设置请求 */
export const reqSetLike = (params = {}) => {
  return httpPost('/commentApp/user/setDietLike', params)
}


/** 修改用户信息 */
export const reqSetUserInfo= (params = {}) => {
  return httpPost('/commentApp/user/setUserInfo', params)
}

/** 删除头像 */
export const reqDelFile= (params = {}) => {
  return httpPost('/commentApp/common/deleteFile', params)
}


/** 匿名评论 */
export const reqSetAnonymous= (params = {}) => {
  return httpPost('/commentApp/user/setAnonymous', params)
}

/**
 * 健康信息
 */
export const reqUserDetail = (params = {}) => {
  return httpGet<UserHealthyInfo>('/commentApp/user/selectUserDetails', params)
}
export const reqLabourStrength = (params = {}) => {
  return httpGet('/commentApp/user/getLabourStrength', params)
}
export const reqDiseasesInfo = (params = {}) => {
  return httpGet('/commentApp/user/tDiseasesInfo', params)
}

/**
 * 保存用户信息
 */

export const saveUserInfo = (params = {}) => {
  return httpPost('/commentApp/user/selectUserDetails', params)
}



// 我的关注
export const reqMyAttention = (params = {}) => {
  return httpGet<AttentionInfo[]>('/commentApp/user/getMyAttention', params)
}


// 我的点赞列表
export const reqMyLike = (params = {}) => {
  return httpGet('/commentApp/dish/getMyLikeEvaluate', params)
}

//我的就餐记录
export const reqUserRecord = (params = {}) => {
  return httpGet('/commentApp/user/getUserRecordList', params)
}

//我的营养建议
export const getRepastInfo = (params = {}) => {
  return httpGet('/commentApp/user/getRepastInfo', params)
}
//我的营养建议
export const getDietAdvice = (params = {}) => {
  return httpGet('/commentApp/user/getDietAdvice', params)
}
//我的营养建议
export const getIntakeCurve = (params = {}) => {
  return httpGet('/commentApp/user/getIntakeCurve', params)
}
///我的营养建议
export const getUserNutrition = (params = {}) => {
  return httpGet('/commentApp/user/getUserNutrition', params)
}

//我的评议
export const getMyAdvice = (params = {}) => {
  return httpGet('/commentApp/user/getMyAdvice', params)
}

//删除我的评议
export const deleteMyAdvice = (params = {}) => {
  return httpGet('/commentApp/user/deleteMyAdvice', params)
}

//我的点评
export const getMyEvaluate = (params = {}) => {
  return httpGet('/commentApp/dish/getMyEvaluate', params)
}

//我的预定
export const getMyTheMeal = (params = {}) => {
  return httpGet('/commentApp/dish/getMyTheMeal', params)
}